package com.bookmall.dao;

import java.sql.SQLException;
import java.util.List;

import com.bookmall.entity.Book;

public interface BookDao extends BaseDao<Book>{
	//批量查询书
	List<Book> selectByIds(List<Integer> ids,int page,int pageSize) throws SQLException;
	
	//批量删除图书
	int deleteByIds(List<Integer> ids) throws SQLException;
	
	//根据书名查询图书
	List<Book> selectByName(String bookName,int page,int pageSize) throws SQLException;
	
	//根据价格区间查询图书
	List<Book> selectByPrice(double lowPrice,double hiPrice,int page,int pageSize) throws SQLException;
	
	//根据作者查询图书
	List<Book> selectByAuthor(String author,int page,int pageSize) throws SQLException;
	
	//根据图书类型查询
	List<Book> selectByTypeId(int typeId,int page,int pageSize) throws SQLException;
	
	//更新图片
	int updateBookImg(int bookId,String img) throws SQLException;
	
	//更新销量
	int updateSaleCount(int bookId,int addCount) throws SQLException;
}
